﻿@model CuongHanh.Models.MyStyle
@{
  //  Layout="../Shared/_ALayout.cshtml";
}
<script type="text/javascript">

    function escapeData() {
        window.App.Description.setValue(escape(window.App.Description_e.getValue()));
        window.App.DescriptionEn.setValue(escape(window.App.DescriptionEn_e.getValue()));
        window.App.Description_e.setValue("");
        window.App.DescriptionEn_e.setValue("");
    }
       

</script>
@(Html.X()
          .FormPanel()
          .ID("formModifyDescription")
          .Region(Region.Center)
          .Border(false)
          .StyleSpec("background-color:white;")
          .Padding(10)
          .Items(form =>
                 {
                     form.Add(Html.X().HiddenFor(m => m.Id));
                     form.Add(Html.X().HiddenFor(m => m.Description));
                     form.Add(Html.X().HiddenFor(m => m.DescriptionEn));
                     
                     form.Add(Html.X()
                             .HtmlEditorFor(c=>c.Description_e)
                             .FieldLabel("Mô tả.TV")
                             .Width(700)
                             .Height(200)
                             .Border(true)
                             );
                     
                     form.Add(Html.X()
                             .HtmlEditorFor(c => c.DescriptionEn_e)
                             .FieldLabel("Mô tả.TA")
                             .Width(700)
                             .Height(200)
                             .Border(true)
                             );
                     
                     form.Add(Html.X()
                             .Button()
                             .ID("btUpdate")
                             .Text("Lưu lại")
                             .FormBind(true)
                             .StyleSpec("margin-left:105px;")
                             .Listeners(l => l.Click.Handler = "escapeData()")
                             .DirectClickAction("Description")
                             );
                     form.Add(Html.X()
                             .Button()
                             .ID("btCancel")
                             .Text("Hủy")
                             .StyleSpec("margin-left:10px;")
                             .OnClientClick("App.wdModify.hide();")
                             );
                 }))